<template>
  <template v-for="child in children">
    <el-menu-item :index="child.path">
      <el-icon>
        <component :is="child.meta.icon"/>
      </el-icon>
      <span>{{ child.meta.title }}</span>
    </el-menu-item>
  </template>
</template>

<script setup lang="ts">
import {MenuItem} from '@/api/menu/model';
// 接收子菜单数据
defineProps<{
  children: MenuItem[];
}>();
</script>